home *** CD-ROM | disk | FTP | other *** search
/ 1st Multimedia Mac Shareware / Multimedia Shareware CD-ROM - BetaCorp.iso / Hypergames / BrainGames / HyperQuackey / background_2543.xml < prev    next >
Encoding:
Extensible Markup Language  |  1992-08-11  |  40.7 KB  |  1,112 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
  3. <background>
  4.     <id>2543</id>
  5.     <filler1>0</filler1>
  6.     <bitmap>BMAP_4875.pbm</bitmap>
  7.     <cantDelete> <false /> </cantDelete>
  8.     <showPict> <true /> </showPict>
  9.     <dontSearch> <false /> </dontSearch>
  10.     <link rel="stylesheet" type="text/css" href="stylesheet_7817.css" />
  11.     <part>
  12.         <id>1</id>
  13.         <type>button</type>
  14.         <visible> <true /> </visible>
  15.         <reserved5> 0 </reserved5>
  16.         <reserved4> 0 </reserved4>
  17.         <reserved3> 0 </reserved3>
  18.         <reserved2> 0 </reserved2>
  19.         <reserved1> 0 </reserved1>
  20.         <enabled> <true /> </enabled>
  21.         <rect>
  22.             <left>84</left>
  23.             <top>219</top>
  24.             <right>108</right>
  25.             <bottom>241</bottom>
  26.         </rect>
  27.         <style>shadow</style>
  28.         <showName> <true /> </showName>
  29.         <highlight> <false /> </highlight>
  30.         <autoHighlight> <false /> </autoHighlight>
  31.         <sharedHighlight> <true /> </sharedHighlight>
  32.         <family>0</family>
  33.         <titleWidth>0</titleWidth>
  34.         <icon>0</icon>
  35.         <textAlign>center</textAlign>
  36.         <font>Chicago</font>
  37.         <textSize>12</textSize>
  38.         <textStyle>plain</textStyle>
  39.         <name>J</name>
  40.         <script>on mouseDown
  41. handleCubeClick (the number of me)
  42. end mouseDown
  43.  
  44. on Roll
  45. handleRoll (the number of me), "JXEZVQ"
  46. end Roll</script>
  47.     </part>
  48.     <part>
  49.         <id>2</id>
  50.         <type>button</type>
  51.         <visible> <true /> </visible>
  52.         <reserved5> 0 </reserved5>
  53.         <reserved4> 0 </reserved4>
  54.         <reserved3> 0 </reserved3>
  55.         <reserved2> 0 </reserved2>
  56.         <reserved1> 0 </reserved1>
  57.         <enabled> <true /> </enabled>
  58.         <rect>
  59.             <left>110</left>
  60.             <top>216</top>
  61.             <right>133</right>
  62.             <bottom>238</bottom>
  63.         </rect>
  64.         <style>shadow</style>
  65.         <showName> <true /> </showName>
  66.         <highlight> <false /> </highlight>
  67.         <autoHighlight> <false /> </autoHighlight>
  68.         <sharedHighlight> <true /> </sharedHighlight>
  69.         <family>0</family>
  70.         <titleWidth>0</titleWidth>
  71.         <icon>0</icon>
  72.         <textAlign>center</textAlign>
  73.         <font>Chicago</font>
  74.         <textSize>12</textSize>
  75.         <textStyle>plain</textStyle>
  76.         <name>B</name>
  77.         <script>on mouseDown
  78. handleCubeClick (the number of me)
  79. end mouseDown
  80.  
  81. on Roll
  82. handleRoll (the number of me), "RKHTBI"
  83. end Roll</script>
  84.     </part>
  85.     <part>
  86.         <id>4</id>
  87.         <type>button</type>
  88.         <visible> <true /> </visible>
  89.         <reserved5> 0 </reserved5>
  90.         <reserved4> 0 </reserved4>
  91.         <reserved3> 0 </reserved3>
  92.         <reserved2> 0 </reserved2>
  93.         <reserved1> 0 </reserved1>
  94.         <enabled> <true /> </enabled>
  95.         <rect>
  96.             <left>149</left>
  97.             <top>219</top>
  98.             <right>172</right>
  99.             <bottom>241</bottom>
  100.         </rect>
  101.         <style>shadow</style>
  102.         <showName> <true /> </showName>
  103.         <highlight> <false /> </highlight>
  104.         <autoHighlight> <false /> </autoHighlight>
  105.         <sharedHighlight> <true /> </sharedHighlight>
  106.         <family>0</family>
  107.         <titleWidth>0</titleWidth>
  108.         <icon>0</icon>
  109.         <textAlign>center</textAlign>
  110.         <font>Chicago</font>
  111.         <textSize>12</textSize>
  112.         <textStyle>plain</textStyle>
  113.         <name>U</name>
  114.         <script>on mouseDown
  115. handleCubeClick (the number of me)
  116. end mouseDown
  117.  
  118. on Roll
  119. handleRoll (the number of me), "TIFPNU"
  120. end Roll</script>
  121.     </part>
  122.     <part>
  123.         <id>5</id>
  124.         <type>button</type>
  125.         <visible> <true /> </visible>
  126.         <reserved5> 0 </reserved5>
  127.         <reserved4> 0 </reserved4>
  128.         <reserved3> 0 </reserved3>
  129.         <reserved2> 0 </reserved2>
  130.         <reserved1> 0 </reserved1>
  131.         <enabled> <true /> </enabled>
  132.         <rect>
  133.             <left>175</left>
  134.             <top>213</top>
  135.             <right>199</right>
  136.             <bottom>235</bottom>
  137.         </rect>
  138.         <style>shadow</style>
  139.         <showName> <true /> </showName>
  140.         <highlight> <false /> </highlight>
  141.         <autoHighlight> <false /> </autoHighlight>
  142.         <sharedHighlight> <true /> </sharedHighlight>
  143.         <family>0</family>
  144.         <titleWidth>0</titleWidth>
  145.         <icon>0</icon>
  146.         <textAlign>center</textAlign>
  147.         <font>Chicago</font>
  148.         <textSize>12</textSize>
  149.         <textStyle>plain</textStyle>
  150.         <name>O</name>
  151.         <script>on mouseDown
  152. handleCubeClick (the number of me)
  153. end mouseDown
  154.  
  155. on Roll
  156. handleRoll (the number of me), "WLBOOY"
  157. end Roll</script>
  158.     </part>
  159.     <part>
  160.         <id>8</id>
  161.         <type>button</type>
  162.         <visible> <true /> </visible>
  163.         <reserved5> 0 </reserved5>
  164.         <reserved4> 0 </reserved4>
  165.         <reserved3> 0 </reserved3>
  166.         <reserved2> 0 </reserved2>
  167.         <reserved1> 0 </reserved1>
  168.         <enabled> <true /> </enabled>
  169.         <rect>
  170.             <left>85</left>
  171.             <top>243</top>
  172.             <right>108</right>
  173.             <bottom>265</bottom>
  174.         </rect>
  175.         <style>shadow</style>
  176.         <showName> <true /> </showName>
  177.         <highlight> <false /> </highlight>
  178.         <autoHighlight> <false /> </autoHighlight>
  179.         <sharedHighlight> <true /> </sharedHighlight>
  180.         <family>0</family>
  181.         <titleWidth>0</titleWidth>
  182.         <icon>0</icon>
  183.         <textAlign>center</textAlign>
  184.         <font>Chicago</font>
  185.         <textSize>12</textSize>
  186.         <textStyle>plain</textStyle>
  187.         <name>C</name>
  188.         <script>on mouseDown
  189. handleCubeClick (the number of me)
  190. end mouseDown
  191.  
  192. on Roll
  193. handleRoll (the number of me), "COPMOW"
  194. end Roll</script>
  195.     </part>
  196.     <part>
  197.         <id>9</id>
  198.         <type>button</type>
  199.         <visible> <true /> </visible>
  200.         <reserved5> 0 </reserved5>
  201.         <reserved4> 0 </reserved4>
  202.         <reserved3> 0 </reserved3>
  203.         <reserved2> 0 </reserved2>
  204.         <reserved1> 0 </reserved1>
  205.         <enabled> <true /> </enabled>
  206.         <rect>
  207.             <left>112</left>
  208.             <top>249</top>
  209.             <right>135</right>
  210.             <bottom>271</bottom>
  211.         </rect>
  212.         <style>shadow</style>
  213.         <showName> <true /> </showName>
  214.         <highlight> <false /> </highlight>
  215.         <autoHighlight> <false /> </autoHighlight>
  216.         <sharedHighlight> <true /> </sharedHighlight>
  217.         <family>0</family>
  218.         <titleWidth>0</titleWidth>
  219.         <icon>0</icon>
  220.         <textAlign>center</textAlign>
  221.         <font>Chicago</font>
  222.         <textSize>12</textSize>
  223.         <textStyle>plain</textStyle>
  224.         <name>N</name>
  225.         <script>on mouseDown
  226. handleCubeClick (the number of me)
  227. end mouseDown
  228.  
  229. on Roll
  230. handleRoll (the number of me), "TODLNR"
  231. end Roll</script>
  232.     </part>
  233.     <part>
  234.         <id>10</id>
  235.         <type>button</type>
  236.         <visible> <true /> </visible>
  237.         <reserved5> 0 </reserved5>
  238.         <reserved4> 0 </reserved4>
  239.         <reserved3> 0 </reserved3>
  240.         <reserved2> 0 </reserved2>
  241.         <reserved1> 0 </reserved1>
  242.         <enabled> <true /> </enabled>
  243.         <rect>
  244.             <left>140</left>
  245.             <top>245</top>
  246.             <right>163</right>
  247.             <bottom>267</bottom>
  248.         </rect>
  249.         <style>shadow</style>
  250.         <showName> <true /> </showName>
  251.         <highlight> <false /> </highlight>
  252.         <autoHighlight> <false /> </autoHighlight>
  253.         <sharedHighlight> <true /> </sharedHighlight>
  254.         <family>0</family>
  255.         <titleWidth>0</titleWidth>
  256.         <icon>0</icon>
  257.         <textAlign>center</textAlign>
  258.         <font>Chicago</font>
  259.         <textSize>12</textSize>
  260.         <textStyle>plain</textStyle>
  261.         <name>E</name>
  262.         <script>on mouseDown
  263. handleCubeClick (the number of me)
  264. end mouseDown
  265.  
  266. on Roll
  267. handleRoll (the number of me), "AAAEEE"
  268. end Roll</script>
  269.     </part>
  270.     <part>
  271.         <id>11</id>
  272.         <type>button</type>
  273.         <visible> <true /> </visible>
  274.         <reserved5> 0 </reserved5>
  275.         <reserved4> 0 </reserved4>
  276.         <reserved3> 0 </reserved3>
  277.         <reserved2> 0 </reserved2>
  278.         <reserved1> 0 </reserved1>
  279.         <enabled> <true /> </enabled>
  280.         <rect>
  281.             <left>179</left>
  282.             <top>241</top>
  283.             <right>202</right>
  284.             <bottom>263</bottom>
  285.         </rect>
  286.         <style>shadow</style>
  287.         <showName> <true /> </showName>
  288.         <highlight> <false /> </highlight>
  289.         <autoHighlight> <false /> </autoHighlight>
  290.         <sharedHighlight> <true /> </sharedHighlight>
  291.         <family>0</family>
  292.         <titleWidth>0</titleWidth>
  293.         <icon>0</icon>
  294.         <textAlign>center</textAlign>
  295.         <font>Chicago</font>
  296.         <textSize>12</textSize>
  297.         <textStyle>plain</textStyle>
  298.         <name>A</name>
  299.         <script>on mouseDown
  300. handleCubeClick (the number of me)
  301. end mouseDown
  302.  
  303. on Roll
  304. handleRoll (the number of me), "AAAEEE"
  305. end Roll</script>
  306.     </part>
  307.     <part>
  308.         <id>12</id>
  309.         <type>button</type>
  310.         <visible> <true /> </visible>
  311.         <reserved5> 0 </reserved5>
  312.         <reserved4> 0 </reserved4>
  313.         <reserved3> 0 </reserved3>
  314.         <reserved2> 0 </reserved2>
  315.         <reserved1> 0 </reserved1>
  316.         <enabled> <true /> </enabled>
  317.         <rect>
  318.             <left>81</left>
  319.             <top>276</top>
  320.             <right>104</right>
  321.             <bottom>298</bottom>
  322.         </rect>
  323.         <style>shadow</style>
  324.         <showName> <true /> </showName>
  325.         <highlight> <false /> </highlight>
  326.         <autoHighlight> <false /> </autoHighlight>
  327.         <sharedHighlight> <true /> </sharedHighlight>
  328.         <family>0</family>
  329.         <titleWidth>0</titleWidth>
  330.         <icon>0</icon>
  331.         <textAlign>center</textAlign>
  332.         <font>Chicago</font>
  333.         <textSize>12</textSize>
  334.         <textStyle>plain</textStyle>
  335.         <name>U</name>
  336.         <script>on mouseDown
  337. handleCubeClick (the number of me)
  338. end mouseDown
  339.  
  340. on Roll
  341. handleRoll (the number of me), "SUIRGM"
  342. end Roll</script>
  343.     </part>
  344.     <part>
  345.         <id>13</id>
  346.         <type>button</type>
  347.         <visible> <true /> </visible>
  348.         <reserved5> 0 </reserved5>
  349.         <reserved4> 0 </reserved4>
  350.         <reserved3> 0 </reserved3>
  351.         <reserved2> 0 </reserved2>
  352.         <reserved1> 0 </reserved1>
  353.         <enabled> <true /> </enabled>
  354.         <rect>
  355.             <left>116</left>
  356.             <top>277</top>
  357.             <right>139</right>
  358.             <bottom>299</bottom>
  359.         </rect>
  360.         <style>shadow</style>
  361.         <showName> <true /> </showName>
  362.         <highlight> <false /> </highlight>
  363.         <autoHighlight> <false /> </autoHighlight>
  364.         <sharedHighlight> <true /> </sharedHighlight>
  365.         <family>0</family>
  366.         <titleWidth>0</titleWidth>
  367.         <icon>0</icon>
  368.         <textAlign>center</textAlign>
  369.         <font>Chicago</font>
  370.         <textSize>12</textSize>
  371.         <textStyle>plain</textStyle>
  372.         <name>U</name>
  373.         <script>on mouseDown
  374. handleCubeClick (the number of me)
  375. end mouseDown
  376.  
  377. on Roll
  378. handleRoll (the number of me), "HIFSUR"
  379. end Roll</script>
  380.     </part>
  381.     <part>
  382.         <id>7</id>
  383.         <type>button</type>
  384.         <visible> <false /> </visible>
  385.         <reserved5> 0 </reserved5>
  386.         <reserved4> 0 </reserved4>
  387.         <reserved3> 0 </reserved3>
  388.         <reserved2> 0 </reserved2>
  389.         <reserved1> 0 </reserved1>
  390.         <enabled> <true /> </enabled>
  391.         <rect>
  392.             <left>145</left>
  393.             <top>277</top>
  394.             <right>170</right>
  395.             <bottom>300</bottom>
  396.         </rect>
  397.         <style>shadow</style>
  398.         <showName> <true /> </showName>
  399.         <highlight> <false /> </highlight>
  400.         <autoHighlight> <false /> </autoHighlight>
  401.         <sharedHighlight> <true /> </sharedHighlight>
  402.         <family>0</family>
  403.         <titleWidth>0</titleWidth>
  404.         <icon>0</icon>
  405.         <textAlign>center</textAlign>
  406.         <font>Chicago</font>
  407.         <textSize>12</textSize>
  408.         <textStyle>plain</textStyle>
  409.         <name>C</name>
  410.         <script>on mouseDown
  411. handleCubeClick (the number of me)
  412. end mouseDown
  413.  
  414. on Roll
  415. handleRoll (the number of me), "GDCJMK"
  416. end Roll</script>
  417.     </part>
  418.     <part>
  419.         <id>3</id>
  420.         <type>button</type>
  421.         <visible> <false /> </visible>
  422.         <reserved5> 0 </reserved5>
  423.         <reserved4> 0 </reserved4>
  424.         <reserved3> 0 </reserved3>
  425.         <reserved2> 0 </reserved2>
  426.         <reserved1> 0 </reserved1>
  427.         <enabled> <true /> </enabled>
  428.         <rect>
  429.             <left>171</left>
  430.             <top>272</top>
  431.             <right>196</right>
  432.             <bottom>295</bottom>
  433.         </rect>
  434.         <style>shadow</style>
  435.         <showName> <true /> </showName>
  436.         <highlight> <false /> </highlight>
  437.         <autoHighlight> <false /> </autoHighlight>
  438.         <sharedHighlight> <true /> </sharedHighlight>
  439.         <family>0</family>
  440.         <titleWidth>0</titleWidth>
  441.         <icon>0</icon>
  442.         <textAlign>center</textAlign>
  443.         <font>Chicago</font>
  444.         <textSize>12</textSize>
  445.         <textStyle>plain</textStyle>
  446.         <name>Q</name>
  447.         <script>on mouseDown
  448. handleCubeClick (the number of me)
  449. end mouseDown
  450.  
  451. on Roll
  452. handleRoll (the number of me), "WVSSQY"
  453. end Roll</script>
  454.     </part>
  455.     <part>
  456.         <id>6</id>
  457.         <type>button</type>
  458.         <visible> <false /> </visible>
  459.         <reserved5> 0 </reserved5>
  460.         <reserved4> 0 </reserved4>
  461.         <reserved3> 0 </reserved3>
  462.         <reserved2> 0 </reserved2>
  463.         <reserved1> 0 </reserved1>
  464.         <enabled> <true /> </enabled>
  465.         <rect>
  466.             <left>88</left>
  467.             <top>309</top>
  468.             <right>113</right>
  469.             <bottom>332</bottom>
  470.         </rect>
  471.         <style>shadow</style>
  472.         <showName> <true /> </showName>
  473.         <highlight> <false /> </highlight>
  474.         <autoHighlight> <false /> </autoHighlight>
  475.         <sharedHighlight> <true /> </sharedHighlight>
  476.         <family>0</family>
  477.         <titleWidth>0</titleWidth>
  478.         <icon>0</icon>
  479.         <textAlign>center</textAlign>
  480.         <font>Chicago</font>
  481.         <textSize>12</textSize>
  482.         <textStyle>plain</textStyle>
  483.         <name>B</name>
  484.         <script>on mouseDown
  485. handleCubeClick (the number of me)
  486. end mouseDown
  487.  
  488. on Roll
  489. handleRoll (the number of me), "PFNHLB"
  490. end Roll</script>
  491.     </part>
  492.     <part>
  493.         <id>14</id>
  494.         <type>button</type>
  495.         <visible> <true /> </visible>
  496.         <reserved5> 0 </reserved5>
  497.         <reserved4> 0 </reserved4>
  498.         <reserved3> 0 </reserved3>
  499.         <reserved2> 0 </reserved2>
  500.         <reserved1> 0 </reserved1>
  501.         <enabled> <true /> </enabled>
  502.         <rect>
  503.             <left>341</left>
  504.             <top>243</top>
  505.             <right>396</right>
  506.             <bottom>263</bottom>
  507.         </rect>
  508.         <style>roundrect</style>
  509.         <showName> <true /> </showName>
  510.         <highlight> <false /> </highlight>
  511.         <autoHighlight> <true /> </autoHighlight>
  512.         <sharedHighlight> <true /> </sharedHighlight>
  513.         <family>0</family>
  514.         <titleWidth>0</titleWidth>
  515.         <icon>0</icon>
  516.         <textAlign>center</textAlign>
  517.         <font>Chicago</font>
  518.         <textSize>12</textSize>
  519.         <textStyle>plain</textStyle>
  520.         <name>Score</name>
  521.         <script>on mouseUp
  522. global gameState, numPlayers, curPlayer, vulScore, winningScore
  523. if gameState = "readyToScore" then
  524. put field Score into savedScore
  525. repeat with i = 3 to 10
  526. do "send Score to field " & quote & i & " Letter Words" & quote
  527. end repeat
  528. if savedScore ‚â• vulScore then --if vulnerable, check score above 500
  529. if field Score - savedScore < 500 then
  530. put savedScore - 500 into field Score
  531. end if
  532. end if
  533. put "-:--" into field Timer
  534. if field Score ‚â• winningScore then
  535. gameOver
  536. else
  537. set lockscreen to true
  538. go next card
  539. if (the name of this card) ‚↠"card " & quote & "HQ Preferences" & quote then
  540. answer "Get ready for the next roll!" with "OK"
  541. go previous card
  542. set lockscreen to false
  543. visual effect scroll left
  544. go next card
  545. else
  546. answer "Get ready for the next roll!" with "OK"
  547. go previous card
  548. set lockscreen to false
  549. visual effect scroll right
  550. go card "Player 1"
  551. end if
  552. setGameState "readyToPlay"
  553. end if
  554. end if
  555. --put gameState
  556. end mouseUp</script>
  557.     </part>
  558.     <part>
  559.         <id>15</id>
  560.         <type>button</type>
  561.         <visible> <true /> </visible>
  562.         <reserved5> 0 </reserved5>
  563.         <reserved4> 0 </reserved4>
  564.         <reserved3> 0 </reserved3>
  565.         <reserved2> 0 </reserved2>
  566.         <reserved1> 0 </reserved1>
  567.         <enabled> <true /> </enabled>
  568.         <rect>
  569.             <left>342</left>
  570.             <top>199</top>
  571.             <right>501</right>
  572.             <bottom>220</bottom>
  573.         </rect>
  574.         <style>shadow</style>
  575.         <showName> <true /> </showName>
  576.         <highlight> <false /> </highlight>
  577.         <autoHighlight> <false /> </autoHighlight>
  578.         <sharedHighlight> <true /> </sharedHighlight>
  579.         <family>0</family>
  580.         <titleWidth>0</titleWidth>
  581.         <icon>0</icon>
  582.         <textAlign>center</textAlign>
  583.         <font>Chicago</font>
  584.         <textSize>12</textSize>
  585.         <textStyle>plain</textStyle>
  586.         <name>Clear word in progress</name>
  587.         <script>on mouseUp
  588. global newWord
  589. put empty into newWord
  590. put empty into field "New Word"
  591. repeat with i = 1 to 13
  592. set the hilite of bkgnd button i to false
  593. end repeat
  594. end mouseUp
  595. </script>
  596.     </part>
  597.     <part>
  598.         <id>16</id>
  599.         <type>button</type>
  600.         <visible> <true /> </visible>
  601.         <reserved5> 0 </reserved5>
  602.         <reserved4> 0 </reserved4>
  603.         <reserved3> 0 </reserved3>
  604.         <reserved2> 0 </reserved2>
  605.         <reserved1> 0 </reserved1>
  606.         <enabled> <true /> </enabled>
  607.         <rect>
  608.             <left>341</left>
  609.             <top>265</top>
  610.             <right>415</right>
  611.             <bottom>285</bottom>
  612.         </rect>
  613.         <style>roundrect</style>
  614.         <showName> <true /> </showName>
  615.         <highlight> <false /> </highlight>
  616.         <autoHighlight> <true /> </autoHighlight>
  617.         <sharedHighlight> <true /> </sharedHighlight>
  618.         <family>0</family>
  619.         <titleWidth>0</titleWidth>
  620.         <icon>0</icon>
  621.         <textAlign>center</textAlign>
  622.         <font>Chicago</font>
  623.         <textSize>12</textSize>
  624.         <textStyle>plain</textStyle>
  625.         <name>New Roll</name>
  626.         <script>on mouseUp
  627. global secsOffset, gameState, newWord, vulScore
  628. --put gameState
  629. if gameState = "justOpened" then
  630. send mouseUp to bkgnd button "New Game"
  631. end if
  632. if gameState = "readyToPlay" then
  633. set cursor to 4
  634. -- check for vulnerability
  635. if field "Score" ‚â• vulScore then
  636. show bkgnd button 11
  637. show bkgnd button 12
  638. show bkgnd button 13
  639. hide field "3 Letter Words"
  640. end if
  641. -- clear out word lists
  642. repeat with i = 3 to 10
  643. do "put empty into field " & quote & i & " Letter Words" & quote
  644. end repeat
  645. play "harpsichord" tempo 70 "c4 c c c c5 c c c"
  646. resetCubes
  647. put empty into newWord
  648. put empty into field "New Word"
  649. put the secs into secsOffset
  650. setGameState "clockRunning"
  651. else
  652. if gameState = "clockRanOut" or gameState = "readyToScore" then
  653. answer "Please score this roll first." with "OK"
  654. end if
  655. end if
  656. --put gameState
  657. end mouseUp
  658.  
  659. on resetCubes
  660. put 0 into j
  661. put 0 into k
  662. repeat with i = 1 to 13
  663. send Roll to bkgnd button i
  664. put random(10) into r1
  665. put random(10) into r2
  666. set the location of bkgnd button i to 90+30*k+r1, 220+30*j+r2
  667. if i mod 4 = 0 then
  668. add 1 to j
  669. put 0 into k
  670. else
  671. add 1 to k
  672. end if
  673. end repeat
  674. end resetCubes
  675. </script>
  676.     </part>
  677.     <part>
  678.         <id>17</id>
  679.         <type>button</type>
  680.         <visible> <true /> </visible>
  681.         <reserved5> 0 </reserved5>
  682.         <reserved4> 0 </reserved4>
  683.         <reserved3> 0 </reserved3>
  684.         <reserved2> 0 </reserved2>
  685.         <reserved1> 0 </reserved1>
  686.         <enabled> <true /> </enabled>
  687.         <rect>
  688.             <left>342</left>
  689.             <top>152</top>
  690.             <right>501</right>
  691.             <bottom>197</bottom>
  692.         </rect>
  693.         <style>shadow</style>
  694.         <showName> <true /> </showName>
  695.         <highlight> <false /> </highlight>
  696.         <autoHighlight> <false /> </autoHighlight>
  697.         <sharedHighlight> <true /> </sharedHighlight>
  698.         <family>0</family>
  699.         <titleWidth>0</titleWidth>
  700.         <icon>0</icon>
  701.         <textAlign>center</textAlign>
  702.         <font>Chicago</font>
  703.         <textSize>12</textSize>
  704.         <textStyle>plain</textStyle>
  705.         <name>Word</name>
  706.         <script>on mouseUp
  707. global newWord, gameState
  708. put length(newWord) into wLen
  709. if wLen ‚â• 3 and wLen ‚â§ 10 and ¬¨
  710. gameState = "clockRunning" then
  711. -- set lockscreen to true
  712. put quote & wLen & " Letter Words" & quote into fName
  713. if wLen > 3 and char wLen of newWord = "S" then
  714. put quote & wLen-1 & " Letter Words" & quote into singularFName
  715. do "put field " & singularFName & "into temp1"
  716. put (char 1 to (wLen-1) of newWord) into singularWord
  717. else
  718. put "!" into temp1
  719. put "%" into singularWord
  720. end if
  721. do "put field " & fName & "into temp2"
  722. if offset(newWord, temp2) = 0 and ¬¨
  723. offset(singularWord, temp1) = 0 then
  724. do "put newWord & return after field " & fName
  725. wordSound
  726. do "put the number of lines in field " & fName & " into temp"
  727. if temp ‚â• 5 then
  728. wordSound
  729. end if
  730. else errorSound
  731. else errorSound
  732. put empty into newWord
  733. repeat with i = 1 to 13
  734. set the hilite of bkgnd button i to false
  735. end repeat
  736. set the cursor to 0
  737. end mouseUp
  738.  
  739. on wordSound
  740. play "harpsichord" tempo 1500 "c4 e5 g6"
  741. end wordSound
  742. </script>
  743.     </part>
  744.     <part>
  745.         <id>20</id>
  746.         <type>field</type>
  747.         <visible> <true /> </visible>
  748.         <dontWrap> <false /> </dontWrap>
  749.         <dontSearch> <false /> </dontSearch>
  750.         <sharedText> <false /> </sharedText>
  751.         <fixedLineHeight> <true /> </fixedLineHeight>
  752.         <autoTab> <false /> </autoTab>
  753.         <lockText> <true /> </lockText>
  754.         <rect>
  755.             <left>341</left>
  756.             <top>291</top>
  757.             <right>415</right>
  758.             <bottom>316</bottom>
  759.         </rect>
  760.         <style>rectangle</style>
  761.         <autoSelect> <false /> </autoSelect>
  762.         <showLines> <false /> </showLines>
  763.         <wideMargins> <false /> </wideMargins>
  764.         <multipleLines> <false /> </multipleLines>
  765.         <reservedFamily> 0 </reservedFamily>
  766.         <titleWidth>0</titleWidth>
  767.         <icon>0</icon>
  768.         <textAlign>left</textAlign>
  769.         <font>Geneva</font>
  770.         <textSize>18</textSize>
  771.         <textStyle>plain</textStyle>
  772.         <textHeight>24</textHeight>
  773.         <name>Score</name>
  774.         <script></script>
  775.     </part>
  776.     <part>
  777.         <id>21</id>
  778.         <type>field</type>
  779.         <visible> <true /> </visible>
  780.         <dontWrap> <false /> </dontWrap>
  781.         <dontSearch> <false /> </dontSearch>
  782.         <sharedText> <false /> </sharedText>
  783.         <fixedLineHeight> <true /> </fixedLineHeight>
  784.         <autoTab> <false /> </autoTab>
  785.         <lockText> <true /> </lockText>
  786.         <rect>
  787.             <left>5</left>
  788.             <top>152</top>
  789.             <right>170</right>
  790.             <bottom>171</bottom>
  791.         </rect>
  792.         <style>rectangle</style>
  793.         <autoSelect> <false /> </autoSelect>
  794.         <showLines> <false /> </showLines>
  795.         <wideMargins> <false /> </wideMargins>
  796.         <multipleLines> <false /> </multipleLines>
  797.         <reservedFamily> 0 </reservedFamily>
  798.         <titleWidth>0</titleWidth>
  799.         <icon>0</icon>
  800.         <textAlign>left</textAlign>
  801.         <font>Geneva</font>
  802.         <textSize>12</textSize>
  803.         <textStyle>bold</textStyle>
  804.         <textHeight>16</textHeight>
  805.         <name>New Word</name>
  806.         <script></script>
  807.     </part>
  808.     <part>
  809.         <id>22</id>
  810.         <type>field</type>
  811.         <visible> <true /> </visible>
  812.         <dontWrap> <false /> </dontWrap>
  813.         <dontSearch> <false /> </dontSearch>
  814.         <sharedText> <false /> </sharedText>
  815.         <fixedLineHeight> <true /> </fixedLineHeight>
  816.         <autoTab> <false /> </autoTab>
  817.         <lockText> <false /> </lockText>
  818.         <rect>
  819.             <left>5</left>
  820.             <top>81</top>
  821.             <right>40</right>
  822.             <bottom>145</bottom>
  823.         </rect>
  824.         <style>rectangle</style>
  825.         <autoSelect> <false /> </autoSelect>
  826.         <showLines> <true /> </showLines>
  827.         <wideMargins> <false /> </wideMargins>
  828.         <multipleLines> <false /> </multipleLines>
  829.         <reservedFamily> 0 </reservedFamily>
  830.         <titleWidth>0</titleWidth>
  831.         <icon>0</icon>
  832.         <textAlign>left</textAlign>
  833.         <font>Monaco</font>
  834.         <textSize>9</textSize>
  835.         <textStyle>plain</textStyle>
  836.         <textHeight>12</textHeight>
  837.         <name>3 Letter Words</name>
  838.         <script>on Score
  839. put the number of lines of field (the number of me) into nLines
  840. if nLines > 0 and field "Score" < 2000 then
  841. put 50 into base
  842. if nLines > 5 then put 5 into nLines
  843. add 10*nLines to base
  844. add base to field Score
  845. end if
  846. end Score</script>
  847.     </part>
  848.     <part>
  849.         <id>24</id>
  850.         <type>field</type>
  851.         <visible> <true /> </visible>
  852.         <dontWrap> <false /> </dontWrap>
  853.         <dontSearch> <false /> </dontSearch>
  854.         <sharedText> <false /> </sharedText>
  855.         <fixedLineHeight> <true /> </fixedLineHeight>
  856.         <autoTab> <false /> </autoTab>
  857.         <lockText> <false /> </lockText>
  858.         <rect>
  859.             <left>43</left>
  860.             <top>81</top>
  861.             <right>80</right>
  862.             <bottom>146</bottom>
  863.         </rect>
  864.         <style>rectangle</style>
  865.         <autoSelect> <false /> </autoSelect>
  866.         <showLines> <true /> </showLines>
  867.         <wideMargins> <false /> </wideMargins>
  868.         <multipleLines> <false /> </multipleLines>
  869.         <reservedFamily> 0 </reservedFamily>
  870.         <titleWidth>0</titleWidth>
  871.         <icon>0</icon>
  872.         <textAlign>left</textAlign>
  873.         <font>Monaco</font>
  874.         <textSize>9</textSize>
  875.         <textStyle>plain</textStyle>
  876.         <textHeight>12</textHeight>
  877.         <name>4 Letter Words</name>
  878.         <script>on Score
  879. put the number of lines of field (the number of me) into nLines
  880. if nLines > 0 then
  881. if nLines > 5 then put 5 into nLines
  882. put 100 into base
  883. add 20*nLines to base
  884. add base to field Score
  885. if nLines = 5 and ¬¨
  886. the number of lines of field "3 Letter Words" = 5 and ¬¨
  887. field Score < 2000 then
  888. add 300 to field Score
  889. end if
  890. end if
  891. end Score
  892. </script>
  893.     </part>
  894.     <part>
  895.         <id>25</id>
  896.         <type>field</type>
  897.         <visible> <true /> </visible>
  898.         <dontWrap> <false /> </dontWrap>
  899.         <dontSearch> <false /> </dontSearch>
  900.         <sharedText> <false /> </sharedText>
  901.         <fixedLineHeight> <true /> </fixedLineHeight>
  902.         <autoTab> <false /> </autoTab>
  903.         <lockText> <false /> </lockText>
  904.         <rect>
  905.             <left>83</left>
  906.             <top>81</top>
  907.             <right>128</right>
  908.             <bottom>146</bottom>
  909.         </rect>
  910.         <style>rectangle</style>
  911.         <autoSelect> <false /> </autoSelect>
  912.         <showLines> <true /> </showLines>
  913.         <wideMargins> <false /> </wideMargins>
  914.         <multipleLines> <false /> </multipleLines>
  915.         <reservedFamily> 0 </reservedFamily>
  916.         <titleWidth>0</titleWidth>
  917.         <icon>0</icon>
  918.         <textAlign>left</textAlign>
  919.         <font>Monaco</font>
  920.         <textSize>9</textSize>
  921.         <textStyle>plain</textStyle>
  922.         <textHeight>12</textHeight>
  923.         <name>5 Letter Words</name>
  924.         <script>on Score
  925. put the number of lines of field (the number of me) into nLines
  926. if nLines > 0 then
  927. if nLines > 5 then put 5 into nLines
  928. put 150 into base
  929. add 50*nLines to base
  930. add base to field Score
  931. if nLines = 5 and ¬¨
  932. the number of lines of field "4 Letter Words" = 5 then
  933. add 500 to field Score
  934. end if
  935. end if
  936. end Score</script>
  937.     </part>
  938.     <part>
  939.         <id>26</id>
  940.         <type>field</type>
  941.         <visible> <true /> </visible>
  942.         <dontWrap> <false /> </dontWrap>
  943.         <dontSearch> <false /> </dontSearch>
  944.         <sharedText> <false /> </sharedText>
  945.         <fixedLineHeight> <true /> </fixedLineHeight>
  946.         <autoTab> <false /> </autoTab>
  947.         <lockText> <false /> </lockText>
  948.         <rect>
  949.             <left>131</left>
  950.             <top>81</top>
  951.             <right>183</right>
  952.             <bottom>146</bottom>
  953.         </rect>
  954.         <style>rectangle</style>
  955.         <autoSelect> <false /> </autoSelect>
  956.         <showLines> <true /> </showLines>
  957.         <wideMargins> <false /> </wideMargins>
  958.         <multipleLines> <false /> </multipleLines>
  959.         <reservedFamily> 0 </reservedFamily>
  960.         <titleWidth>0</titleWidth>
  961.         <icon>0</icon>
  962.         <textAlign>left</textAlign>
  963.         <font>Monaco</font>
  964.         <textSize>9</textSize>
  965.         <textStyle>plain</textStyle>
  966.         <textHeight>12</textHeight>
  967.         <name>6 Letter Words</name>
  968.         <script>on Score
  969. put the number of lines of field (the number of me) into nLines
  970. if nLines > 0 then
  971. if nLines > 5 then put 5 into nLines
  972. put 200 into base
  973. add 100*nLines to base
  974. add base to field Score
  975. if nLines = 5 and ¬¨
  976. the number of lines of field "4 Letter Words" = 5 then
  977. add 800 to field Score
  978. end if
  979. end if
  980. end Score</script>
  981.     </part>
  982.     <part>
  983.         <id>27</id>
  984.         <type>field</type>
  985.         <visible> <true /> </visible>
  986.         <dontWrap> <false /> </dontWrap>
  987.         <dontSearch> <false /> </dontSearch>
  988.         <sharedText> <false /> </sharedText>
  989.         <fixedLineHeight> <true /> </fixedLineHeight>
  990.         <autoTab> <false /> </autoTab>
  991.         <lockText> <false /> </lockText>
  992.         <rect>
  993.             <left>186</left>
  994.             <top>81</top>
  995.             <right>250</right>
  996.             <bottom>146</bottom>
  997.         </rect>
  998.         <style>rectangle</style>
  999.         <autoSelect> <false /> </autoSelect>
  1000.         <showLines> <true /> </showLines>
  1001.         <wideMargins> <false /> </wideMargins>
  1002.         <multipleLines> <false /> </multipleLines>
  1003.         <reservedFamily> 0 </reservedFamily>
  1004.         <titleWidth>0</titleWidth>
  1005.         <icon>0</icon>
  1006.         <textAlign>left</textAlign>
  1007.         <font>Monaco</font>
  1008.         <textSize>9</textSize>
  1009.         <textStyle>plain</textStyle>
  1010.         <textHeight>12</textHeight>
  1011.         <name>7 Letter Words</name>
  1012.         <script>on Score
  1013. put the number of lines of field (the number of me) into nLines
  1014. if nLines > 0 then
  1015. if nLines > 5 then put 5 into nLines
  1016. put 350 into base
  1017. add 150*nLines to base
  1018. add base to field Score
  1019. if nLines = 5 and ¬¨
  1020. the number of lines of field "4 Letter Words" = 5 then
  1021. add 1200 to field Score
  1022. end if
  1023. end if
  1024. end Score</script>
  1025.     </part>
  1026.     <part>
  1027.         <id>28</id>
  1028.         <type>field</type>
  1029.         <visible> <true /> </visible>
  1030.         <dontWrap> <false /> </dontWrap>
  1031.         <dontSearch> <false /> </dontSearch>
  1032.         <sharedText> <false /> </sharedText>
  1033.         <fixedLineHeight> <true /> </fixedLineHeight>
  1034.         <autoTab> <false /> </autoTab>
  1035.         <lockText> <false /> </lockText>
  1036.         <rect>
  1037.             <left>253</left>
  1038.             <top>81</top>
  1039.             <right>324</right>
  1040.             <bottom>146</bottom>
  1041.         </rect>
  1042.         <style>rectangle</style>
  1043.         <autoSelect> <false /> </autoSelect>
  1044.         <showLines> <true /> </showLines>
  1045.         <wideMargins> <false /> </wideMargins>
  1046.         <multipleLines> <false /> </multipleLines>
  1047.         <reservedFamily> 0 </reservedFamily>
  1048.         <titleWidth>0</titleWidth>
  1049.         <icon>0</icon>
  1050.         <textAlign>left</textAlign>
  1051.         <font>Monaco</font>
  1052.         <textSize>9</textSize>
  1053.         <textStyle>plain</textStyle>
  1054.         <textHeight>12</textHeight>
  1055.         <name>8 Letter Words</name>
  1056.         <script>on Score
  1057. put the number of lines of field (the number of me) into nLines
  1058. if nLines > 0 then
  1059. if nLines > 5 then put 5 into nLines
  1060. put 500 into base
  1061. add 250*nLines to base
  1062. add base to field Score
  1063. if nLines = 5 and ¬¨
  1064. the number of lines of field "4 Letter Words" = 5 then
  1065. add 1850 to field Score
  1066. end if
  1067. end if
  1068. end Score</script>
  1069.     </part>
  1070.     <part>
  1071.         <id>29</id>
  1072.         <type>field</type>
  1073.         <visible> <true /> </visible>
  1074.         <dontWrap> <false /> </dontWrap>
  1075.         <dontSearch> <false /> </dontSearch>
  1076.         <sharedText> <false /> </sharedText>
  1077.         <fixedLineHeight> <true /> </fixedLineHeight>
  1078.         <autoTab> <false /> </autoTab>
  1079.         <lockText> <false /> </lockText>
  1080.         <rect>
  1081.             <left>327</left>
  1082.             <top>81</top>
  1083.             <right>410</right>
  1084.             <bottom>146</bottom>
  1085.         </rect>
  1086.         <style>rectangle</style>
  1087.         <autoSelect> <false /> </autoSelect>
  1088.         <showLines> <true /> </showLines>
  1089.         <wideMargins> <false /> </wideMargins>
  1090.         <multipleLines> <false /> </multipleLines>
  1091.         <reservedFamily> 0 </reservedFamily>
  1092.         <titleWidth>0</titleWidth>
  1093.         <icon>0</icon>
  1094.         <textAlign>left</textAlign>
  1095.         <font>Monaco</font>
  1096.         <textSize>9</textSize>
  1097.         <textStyle>plain</textStyle>
  1098.         <textHeight>12</textHeight>
  1099.         <name>9 Letter Words</name>
  1100.         <script>on Score
  1101. put the number of lines of field (the number of me) into nLines
  1102. if nLines > 0 then
  1103. if nLines > 5 then put 5 into nLines
  1104. put 500 into base
  1105. add 500*nLines to base
  1106. add base to field Score
  1107. end if
  1108. end Score</script>
  1109.     </part>
  1110.     <part>
  1111.         <id>30</id>
  1112.         <type>field</type>
  1113.         <visible> <true /> </visible>
  1114.         <dontWrap> <false /> </dontWrap>
  1115.         <dontSearch> <false /> </dontSearch>
  1116.         <sharedText> <false /> </sharedText>
  1117.         <fixedLineHeight> <true /> </fixedLineHeight>
  1118.         <autoTab> <false /> </autoTab>
  1119.         <lockText> <false /> </lockText>
  1120.         <rect>
  1121.             <left>413</left>
  1122.             <top>81</top>
  1123.             <right>500</right>
  1124.             <bottom>145</bottom>
  1125.         </rect>
  1126.         <style>rectangle</style>
  1127.         <autoSelect> <false /> </autoSelect>
  1128.         <showLines> <true /> </showLines>
  1129.         <wideMargins> <false /> </wideMargins>
  1130.         <multipleLines> <false /> </multipleLines>
  1131.         <reservedFamily> 0 </reservedFamily>
  1132.         <titleWidth>0</titleWidth>
  1133.         <icon>0</icon>
  1134.         <textAlign>left</textAlign>
  1135.         <font>Monaco</font>
  1136.         <textSize>9</textSize>
  1137.         <textStyle>plain</textStyle>
  1138.         <textHeight>12</textHeight>
  1139.         <name>10 Letter Words</name>
  1140.         <script>on Score
  1141. put the number of lines of field (the number of me) into nLines
  1142. if nLines > 0 then
  1143. if nLines > 5 then put 5 into nLines
  1144. add 1500*nLines to field Score
  1145. end if
  1146. end Score</script>
  1147.     </part>
  1148.     <part>
  1149.         <id>32</id>
  1150.         <type>button</type>
  1151.         <visible> <true /> </visible>
  1152.         <reserved5> 0 </reserved5>
  1153.         <reserved4> 0 </reserved4>
  1154.         <reserved3> 0 </reserved3>
  1155.         <reserved2> 0 </reserved2>
  1156.         <reserved1> 0 </reserved1>
  1157.         <enabled> <true /> </enabled>
  1158.         <rect>
  1159.             <left>417</left>
  1160.             <top>265</top>
  1161.             <right>501</right>
  1162.             <bottom>285</bottom>
  1163.         </rect>
  1164.         <style>roundrect</style>
  1165.         <showName> <true /> </showName>
  1166.         <highlight> <false /> </highlight>
  1167.         <autoHighlight> <true /> </autoHighlight>
  1168.         <sharedHighlight> <true /> </sharedHighlight>
  1169.         <family>0</family>
  1170.         <titleWidth>0</titleWidth>
  1171.         <icon>0</icon>
  1172.         <textAlign>center</textAlign>
  1173.         <font>Chicago</font>
  1174.         <textSize>12</textSize>
  1175.         <textStyle>plain</textStyle>
  1176.         <name>New Game</name>
  1177.         <script>on mouseUp
  1178. global gameState, newWord
  1179. if the optionKey is down then
  1180. resetGame
  1181. else
  1182. if gameState ‚↠"justOpened" and gameState ‚↠"gameOver" then
  1183. --we're in the middle of a game
  1184. answer "End the current game?" with "Yes" or "Cancel"
  1185. if it = "Yes" then newGame --we've already inited cards
  1186. exit mouseUp
  1187. end if
  1188. end if
  1189. repeat with i = 1 to 13
  1190. set the hilite of bkgnd button i to false
  1191. end repeat
  1192. hide bkgnd button 11
  1193. hide bkgnd button 12
  1194. hide bkgnd button 13
  1195. show field "3 Letter Words"
  1196. repeat
  1197. ask "How many players?" with 1
  1198. if it is empty then
  1199. setGameState "justOpened"
  1200. exit mouseUp
  1201. end if
  1202. if it ‚â• "0" and it ‚â§ "9" then
  1203. exit repeat
  1204. else answer "Please enter a number." with "OK"
  1205. end repeat
  1206. if it > 1 then
  1207. repeat with i = 1 to it
  1208. ask "What is the name of player " & i & "?"
  1209. put it into playerName
  1210. if i > 1 then
  1211. set lockscreen to true
  1212. doMenu "New Card"
  1213. set the name of this card to "Player" & i
  1214. end if
  1215. put playerName into field Username
  1216. end repeat
  1217. else
  1218. ask "What is your name?"
  1219. put it into field Username
  1220. end if
  1221. setGameState "readyToPlay"
  1222. go card "Player 1"
  1223. put 0 into field Score
  1224. end mouseUp
  1225. </script>
  1226.     </part>
  1227.     <part>
  1228.         <id>33</id>
  1229.         <type>field</type>
  1230.         <visible> <true /> </visible>
  1231.         <dontWrap> <false /> </dontWrap>
  1232.         <dontSearch> <false /> </dontSearch>
  1233.         <sharedText> <false /> </sharedText>
  1234.         <fixedLineHeight> <true /> </fixedLineHeight>
  1235.         <autoTab> <false /> </autoTab>
  1236.         <lockText> <true /> </lockText>
  1237.         <rect>
  1238.             <left>426</left>
  1239.             <top>291</top>
  1240.             <right>488</right>
  1241.             <bottom>316</bottom>
  1242.         </rect>
  1243.         <style>rectangle</style>
  1244.         <autoSelect> <false /> </autoSelect>
  1245.         <showLines> <false /> </showLines>
  1246.         <wideMargins> <false /> </wideMargins>
  1247.         <multipleLines> <false /> </multipleLines>
  1248.         <reservedFamily> 0 </reservedFamily>
  1249.         <titleWidth>0</titleWidth>
  1250.         <icon>0</icon>
  1251.         <textAlign>left</textAlign>
  1252.         <font>Geneva</font>
  1253.         <textSize>18</textSize>
  1254.         <textStyle>plain</textStyle>
  1255.         <textHeight>24</textHeight>
  1256.         <name>Timer</name>
  1257.         <script></script>
  1258.     </part>
  1259.     <part>
  1260.         <id>34</id>
  1261.         <type>field</type>
  1262.         <visible> <true /> </visible>
  1263.         <dontWrap> <false /> </dontWrap>
  1264.         <dontSearch> <false /> </dontSearch>
  1265.         <sharedText> <false /> </sharedText>
  1266.         <fixedLineHeight> <true /> </fixedLineHeight>
  1267.         <autoTab> <false /> </autoTab>
  1268.         <lockText> <true /> </lockText>
  1269.         <rect>
  1270.             <left>173</left>
  1271.             <top>152</top>
  1272.             <right>303</right>
  1273.             <bottom>171</bottom>
  1274.         </rect>
  1275.         <style>rectangle</style>
  1276.         <autoSelect> <false /> </autoSelect>
  1277.         <showLines> <false /> </showLines>
  1278.         <wideMargins> <false /> </wideMargins>
  1279.         <multipleLines> <false /> </multipleLines>
  1280.         <reservedFamily> 0 </reservedFamily>
  1281.         <titleWidth>0</titleWidth>
  1282.         <icon>0</icon>
  1283.         <textAlign>left</textAlign>
  1284.         <font>Geneva</font>
  1285.         <textSize>12</textSize>
  1286.         <textStyle>bold</textStyle>
  1287.         <textHeight>16</textHeight>
  1288.         <name>Username</name>
  1289.         <script></script>
  1290.     </part>
  1291.     <part>
  1292.         <id>47</id>
  1293.         <type>button</type>
  1294.         <visible> <true /> </visible>
  1295.         <reserved5> 0 </reserved5>
  1296.         <reserved4> 0 </reserved4>
  1297.         <reserved3> 0 </reserved3>
  1298.         <reserved2> 0 </reserved2>
  1299.         <reserved1> 0 </reserved1>
  1300.         <enabled> <true /> </enabled>
  1301.         <rect>
  1302.             <left>398</left>
  1303.             <top>243</top>
  1304.             <right>501</right>
  1305.             <bottom>263</bottom>
  1306.         </rect>
  1307.         <style>roundrect</style>
  1308.         <showName> <true /> </showName>
  1309.         <highlight> <false /> </highlight>
  1310.         <autoHighlight> <true /> </autoHighlight>
  1311.         <sharedHighlight> <true /> </sharedHighlight>
  1312.         <family>0</family>
  1313.         <titleWidth>0</titleWidth>
  1314.         <icon>0</icon>
  1315.         <textAlign>center</textAlign>
  1316.         <font>Chicago</font>
  1317.         <textSize>12</textSize>
  1318.         <textStyle>plain</textStyle>
  1319.         <name>Preferences</name>
  1320.         <script>on mouseUp
  1321. global gameState
  1322. if gameState ‚↠"gameOver" and gameState ‚↠"justOpened" then
  1323. answer "End the current game?" with "Yes" or "Cancel"
  1324. if it is "Cancel" then exit mouseUp
  1325. end if
  1326. resetGame
  1327. visual effect zoom out
  1328. go card "HQ Preferences"
  1329. end mouseUp</script>
  1330.     </part>
  1331.     <part>
  1332.         <id>40</id>
  1333.         <type>field</type>
  1334.         <visible> <false /> </visible>
  1335.         <dontWrap> <false /> </dontWrap>
  1336.         <dontSearch> <false /> </dontSearch>
  1337.         <sharedText> <false /> </sharedText>
  1338.         <fixedLineHeight> <true /> </fixedLineHeight>
  1339.         <autoTab> <false /> </autoTab>
  1340.         <lockText> <true /> </lockText>
  1341.         <rect>
  1342.             <left>1</left>
  1343.             <top>78</top>
  1344.             <right>511</right>
  1345.             <bottom>341</bottom>
  1346.         </rect>
  1347.         <style>rectangle</style>
  1348.         <autoSelect> <false /> </autoSelect>
  1349.         <showLines> <false /> </showLines>
  1350.         <wideMargins> <false /> </wideMargins>
  1351.         <multipleLines> <false /> </multipleLines>
  1352.         <reservedFamily> 0 </reservedFamily>
  1353.         <titleWidth>0</titleWidth>
  1354.         <icon>0</icon>
  1355.         <textAlign>center</textAlign>
  1356.         <font>Geneva</font>
  1357.         <textSize>12</textSize>
  1358.         <textStyle>plain</textStyle>
  1359.         <textHeight>16</textHeight>
  1360.         <name>Screen Mask</name>
  1361.         <script></script>
  1362.     </part>
  1363.     <part>
  1364.         <id>43</id>
  1365.         <type>button</type>
  1366.         <visible> <true /> </visible>
  1367.         <reserved5> 0 </reserved5>
  1368.         <reserved4> 0 </reserved4>
  1369.         <reserved3> 0 </reserved3>
  1370.         <reserved2> 0 </reserved2>
  1371.         <reserved1> 0 </reserved1>
  1372.         <enabled> <true /> </enabled>
  1373.         <rect>
  1374.             <left>342</left>
  1375.             <top>222</top>
  1376.             <right>501</right>
  1377.             <bottom>241</bottom>
  1378.         </rect>
  1379.         <style>shadow</style>
  1380.         <showName> <true /> </showName>
  1381.         <highlight> <false /> </highlight>
  1382.         <autoHighlight> <true /> </autoHighlight>
  1383.         <sharedHighlight> <true /> </sharedHighlight>
  1384.         <family>0</family>
  1385.         <titleWidth>0</titleWidth>
  1386.         <icon>0</icon>
  1387.         <textAlign>center</textAlign>
  1388.         <font>Chicago</font>
  1389.         <textSize>12</textSize>
  1390.         <textStyle>plain</textStyle>
  1391.         <name>Pause</name>
  1392.         <script>on mouseUp
  1393. global gameState, secsOffset, pauseOffset
  1394. if gameState = "clockRunning" then
  1395. if the name of bkgnd button (the number of me) contains "Pause" then
  1396. show field "Screen Mask"
  1397. set the name of bkgnd button (the number of me) to "Resume"
  1398. put the secs into pauseOffset
  1399. else
  1400. hide field "Screen Mask"
  1401. set the name of bkgnd button (the number of me) to "Pause"
  1402. add (the secs - pauseOffset) to secsOffset
  1403. end if
  1404. end if
  1405. end mouseUp
  1406. </script>
  1407.     </part>
  1408.     <part>
  1409.         <id>48</id>
  1410.         <type>button</type>
  1411.         <visible> <true /> </visible>
  1412.         <reserved5> 0 </reserved5>
  1413.         <reserved4> 0 </reserved4>
  1414.         <reserved3> 0 </reserved3>
  1415.         <reserved2> 0 </reserved2>
  1416.         <reserved1> 0 </reserved1>
  1417.         <enabled> <true /> </enabled>
  1418.         <rect>
  1419.             <left>470</left>
  1420.             <top>39</top>
  1421.             <right>502</right>
  1422.             <bottom>68</bottom>
  1423.         </rect>
  1424.         <style>transparent</style>
  1425.         <showName> <false /> </showName>
  1426.         <highlight> <false /> </highlight>
  1427.         <autoHighlight> <false /> </autoHighlight>
  1428.         <sharedHighlight> <true /> </sharedHighlight>
  1429.         <family>0</family>
  1430.         <titleWidth>0</titleWidth>
  1431.         <icon>2478</icon>
  1432.         <textAlign>center</textAlign>
  1433.         <font>Chicago</font>
  1434.         <textSize>12</textSize>
  1435.         <textStyle>plain</textStyle>
  1436.         <name>About</name>
  1437.         <script>on mouseUp
  1438. global gameState
  1439. if gameState ‚↠"gameOver" and gameState ‚↠"justOpened" then
  1440. answer "End the current game?" with "Yes" or "Cancel"
  1441. if it is "Cancel" then exit mouseUp
  1442. end if
  1443. resetGame
  1444. go card "Welcome"
  1445. end mouseUp
  1446.  
  1447. </script>
  1448.     </part>
  1449.     <part>
  1450.         <id>50</id>
  1451.         <type>button</type>
  1452.         <visible> <true /> </visible>
  1453.         <reserved5> 0 </reserved5>
  1454.         <reserved4> 0 </reserved4>
  1455.         <reserved3> 0 </reserved3>
  1456.         <reserved2> 0 </reserved2>
  1457.         <reserved1> 0 </reserved1>
  1458.         <enabled> <true /> </enabled>
  1459.         <rect>
  1460.             <left>5</left>
  1461.             <top>188</top>
  1462.             <right>302</right>
  1463.             <bottom>206</bottom>
  1464.         </rect>
  1465.         <style>rectangle</style>
  1466.         <showName> <true /> </showName>
  1467.         <highlight> <false /> </highlight>
  1468.         <autoHighlight> <false /> </autoHighlight>
  1469.         <sharedHighlight> <true /> </sharedHighlight>
  1470.         <family>0</family>
  1471.         <titleWidth>0</titleWidth>
  1472.         <icon>0</icon>
  1473.         <textAlign>center</textAlign>
  1474.         <font>Chicago</font>
  1475.         <textSize>12</textSize>
  1476.         <textStyle>plain</textStyle>
  1477.         <name>Press Return to start a new game</name>
  1478.         <script></script>
  1479.     </part>
  1480.     <name>Playing Grounds</name>
  1481.     <script>on idle
  1482. global secsOffset, newWord, gameState, playingTime
  1483. --put gameState
  1484. if gameState = "clockRunning" then
  1485. put 0 into m
  1486. if the visible of field "Screen Mask" is true then
  1487. exit idle
  1488. end if
  1489. put playingTime-(the secs-secsOffset) into s
  1490. put s div 60 into m
  1491. put s mod 60 into s
  1492. if s < 10 then put "0" before s
  1493. if playingTime-(the secs-secsOffset) < 0 then
  1494. setGameState "clockRanOut"
  1495. else
  1496. put m & ":" & s into field Timer
  1497. put newWord into field "New Word"
  1498. end if
  1499. else if gameState = "clockRanOut" then
  1500. play "harpsichord" tempo 1000 "c5 d e f g a b c6"
  1501. setGameState "readyToScore"
  1502. end if
  1503. --put gameState
  1504. end idle
  1505.  
  1506. on handleCubeClick
  1507. global newWord, gameState
  1508. if gameState = "clockRunning" then
  1509. put param(1) into buttonName
  1510. if the optionKey is down then
  1511. repeat while the mouse is down
  1512. set the location of bkgnd button buttonName to the mouseloc
  1513. end repeat
  1514. else
  1515. if the shiftKey is down then
  1516. set the hilite of bkgnd button buttonName to false
  1517. put length(newWord) into l
  1518. if l = 1 then put 0 into m else put 1 into m
  1519. put char m to l-1 of newWord into newWord
  1520. else
  1521. play "Harpsichord" tempo 1000 "e6"
  1522. if the hilite of bkgnd button buttonName is false then
  1523. put char 15 of the name of bkgnd button buttonName after newWord
  1524. set the hilite of bkgnd button buttonName to true
  1525. else errorSound
  1526. end if
  1527. end if
  1528. end if
  1529. end handleCubeClick
  1530.  
  1531. on gameOver
  1532. global newWord, gameState
  1533. answer "Congratulations, " & field Username & ", you win!" ¬¨
  1534. with  "Done" or "Play again"
  1535. put it into theAnswer
  1536. setGameState "gameOver"
  1537. if theAnswer is "Done" then
  1538. resetGame
  1539. go card "Welcome"
  1540. else
  1541. newGame
  1542. end if
  1543. end gameOver
  1544.  
  1545. on newGame
  1546. global gameState
  1547. set cursor to 4
  1548. set lockscreen to true
  1549. go card "Player 1"
  1550. put 0 into field Score
  1551. go next card
  1552. put 2 into i
  1553. repeat
  1554. if (the name of this card) = "card " & quote & "HQ Preferences" ¬¨
  1555. & quote
  1556. then
  1557. exit repeat
  1558. end if
  1559. put 0 into field Score
  1560. put empty into field "New Word"
  1561. add 1 to i
  1562. go next card
  1563. end repeat
  1564. go card "Player 1"
  1565. hide bkgnd button 11
  1566. hide bkgnd button 12
  1567. hide bkgnd button 13
  1568. show field "3 Letter Words"
  1569. setGameState "readyToPlay"
  1570. end newGame
  1571.  
  1572. on returnKey
  1573. global gameState
  1574. if the message box is empty or ¬¨
  1575. the visible of the message box is false then
  1576. if gameState = "readyToScore" then
  1577. set the hilite of bkgnd button "Score" to true
  1578. set the hilite of bkgnd button "Score" to false
  1579. send mouseUp to bkgnd button "Score"
  1580. exit returnKey
  1581. end if
  1582. if gameState = "readyToPlay" then
  1583. set the hilite of bkgnd button "New Roll" to true
  1584. set the hilite of bkgnd button "New Roll" to false
  1585. send mouseUp to bkgnd button "New Roll"
  1586. exit returnKey
  1587. end if
  1588. if gameState = "justOpened" or gameState = "gameOver" then
  1589. set the hilite of bkgnd button "New Game" to true
  1590. set the hilite of bkgnd button "New Game" to false
  1591. send mouseUp to bkgnd button "New Game"
  1592. exit returnKey
  1593. end if
  1594. else do the message box
  1595. end returnKey
  1596.  
  1597. on enterKey
  1598. returnKey
  1599. end enterKey
  1600.  
  1601. on arrowKey
  1602. errorSound
  1603. end arrowKey
  1604.  
  1605. on handleRoll
  1606. put param(1) into buttonName
  1607. put param(2) into letters
  1608. set the name of bkgnd button buttonName to any char of letters
  1609. set the hilite of bkgnd button buttonName to false
  1610. end handleRoll
  1611.  
  1612. on setGameState newState
  1613. global gameState
  1614. put newState into gameState
  1615. if gameState = "gameOver" or gameState = "justOpened" then
  1616. set the name of bkgnd button id 50 to  ¬¨
  1617. "Press Return to start a new game"
  1618. show bkgnd button id 50
  1619. else if gameState = "readyToPlay" then
  1620. set the name of bkgnd button id 50 to  ¬¨
  1621. "Press Return to roll the dice"
  1622. show bkgnd button id 50
  1623. else if gameState = "readyToScore" then
  1624. set the name of bkgnd button id 50 to  ¬¨
  1625. "Press Return to score the round"
  1626. show bkgnd button id 50
  1627. else if gameState = "clockRunning" then
  1628. hide bkgnd button id 50
  1629. end if
  1630. end setGameState
  1631.  
  1632. </script>
  1633. </background>
  1634.